package com.cskaoyan.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 窄化请求
 * @author stone
 * @date 2022/03/24 10:08
 */
@RequestMapping("user")
@Controller
public class UserController {

    @ResponseBody
    //@RequestMapping("user/login")
    //@RequestMapping("/login")
    @RequestMapping("login")
    public String login() {
        return "login";
    }
    @ResponseBody
    //@RequestMapping("user/register")
    @RequestMapping("register")
    public String register() {
        return "register";
    }
    @ResponseBody
    //@RequestMapping("user/logout")
    @RequestMapping("logout")
    public String logout() {
        return "logout";
    }
}
